package io.gitee.tziye.core.kv;

import io.gitee.tziye.RenaiClient;

import java.util.Collection;
import java.util.Map;

public abstract class MapOperator extends KvOperator {

    public MapOperator(RenaiClient renaiClient) {
        super(renaiClient);
    }

    public abstract <T> Map<String, T> members(String key, Class<T> clazz);

    public abstract <T> void put(String key, String subKey, T value);

    public abstract <T> void put(String key, Map<String, T> map);

    public abstract <T> T get(String key, String subKey, Class<T> clazz);

    public abstract <T> Map<String, T> get(String key, Collection<String> subKeys, Class<T> clazz);

    public abstract <T> T pop(String key, String subKey, Class<T> clazz);

    public abstract <T> Map<String, T> pop(String key, Collection<String> subKeys, Class<T> clazz);

    public abstract boolean removeKey(String key, String subKey);

    public abstract int removeKeys(String key, Collection<String> subKeys);

    public abstract boolean containsKey(String key, String subKey);

    public abstract long incr(String key, String subKey, long num);

}
